disk_load:
    pusha
    push dx

    mov ah, 0x02; function read
    mov al, dh; read n sectors

    ; CHS
    ; 磁盘有了两个磁头，18个扇区，N个柱面，每个扇区512字节
    mov ch, 0; cylink 0
    mov dh, 0; head 0
    mov cl, 0x02; sector

    int 0x13
    jc read_disk_error

    pop dx
    cmp al, dh
    jne sectors_error
    popa
    ret


read_disk_error:
    mov bx, DISK_ERROR
    call print
    call print_nl
    mov dh, ah; ah=error code, dl = disk drive that dropped the error
    call print_hex
    jmp disk_loop

sectors_error:
    mov bx, SECTOR_ERROR
    call print

disk_loop:
    jmp $

DISK_ERROR:
    db 'Disk read error', 0

SECTOR_ERROR:
    db 'Incorrect number of sectors read', 0